var a= 10
println(a)
val ab = 10
var ac = 30
ac = ab + 10

val x = 1
val result = if (x > 2){
  println("****")
  "abc"
}else{
  println(100)
  100
}

def hello(a:String ,b:Int)={
//  "abc"
  12
}

def hello3(a:Int,b:Int)={
  if (a>10){
      "abc"
  }else{
    12
  }
}

val fun4:(Int,String) => Int = {
  (a,b) => {
    a
  }
}

val fun3:Int => Int ={
  x => x * x
}

var list = List(1,2,3,4,5,6)

list.foreach((x:Int)=>println(x))
list.foreach(println(_))
list.foreach(println)
list.map(x=>x*10)
list.map(_*10)

val list1 = List("hadoop hive spark flink", "hbase spark")
list1.flatMap(x=>x.split(" "))
list1.flatMap(_.split(" "))

list.filter(_>3)
list.filter(_>3).map(_*3)
























